public class Text1 {
    public static void main(String[] args) {
        //选择语句练习 if----else选择语句
        //判断成绩
        int s = 60;
        if (s >= 90 && s <= 100) {
            System.out.println("优秀");
        } else if (s >= 70 && s < 90) {
            System.out.println("良好");
        } else if (s >= 60 && s < 70) {
            System.out.println("及格");
        } else if (s < 60 && s >= 0) {
            System.out.println("不及格");
        } else {
            System.out.println("输入错误");
        }
        //对与错
        int a = 1;
        if (a > 1) {
            System.out.println("true");
        } else {
            System.out.println("false");
        }
        //判断奇偶
        int x = 20;
        if (x % 2 == 0){
            System.out.println("偶数");
        }else {
            System.out.println("奇数");
        }
        //判断正负数
        int y = 30;
        if (y > 0){
            System.out.println("正数");
        } else if (s < 0) {
            System.out.println("负数");
        }else {
            System.out.println("零");
        }
        //判断是否是闰年
        int year = 1000;
        if (year % 100 != 0){
            if (year % 4 == 0){
                System.out.println("闰年");
            }else {
                System.out.println("不是闰年");
            }
        }else if(year % 400 == 0){
            System.out.println("闰年");
        }else{
            System.out.println("不是闰年");
        }
        //switch选择语句
        //break的使用需要注意
        int week = 9;
        switch (week){
            case 1:
                System.out.println("星期一");
                break;
            case 2:
                System.out.println("星期二");
                break;
            case 3:
                System.out.println("星期三");
                break;
            case 4:
                System.out.println("星期四");
                break;
            case 5:
                System.out.println("星期五");
                break;
            case 6:
                System.out.println("星期六");
                break;
            case 7:
                System.out.println("星期天");
                break;
            default:
                System.out.println("输入错误");
        }
    }
}